package com.fingard.dsp.bank.reqrespobj.entrust;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;

import java.util.HashMap;

/**
 * 委托代扣请求实体类
 */
public class ReqEntrustRec extends RequestBase {
    /**
     * 公众号或开发者应用ID
     */
    public String appId = "";

    /**
     * 商户ID
     */
    public String merchantId = "";

    /**
     * 商户账号
     */
    public String ownAct = "";

    /**
     * 商品描述
     */
    public String description = "";

    /**
     * 订单号
     */
    public String rdSeq;

    /**
     * 交易币种
     */
    public String cur = "";

    /**
     * 交易金额
     */
    public String amount = "";

    /**
     * 商品备注
     */
    public String memo = "";

    /**
     * 附加字段
     */
    public String attach = "";

    /**
     * 付款人姓名
     */
    public String oppActName = "";

    /**
     * 证件类型
     */
    public String certType = "";

    /**
     * 付款人证件号码
     */
    public String certNumber = "";

    /**
     * 付款人手机号
     */
    public String cellPhone = "";

    /**
     * 协议模板id
     */
    public String planId = "";

    /**
     * 渠道方返回签约协议id
     */
    public String channelAuthCode = "";

    /** 终端IP */
    public String createIP = "";

    /**
     * 是否实名标志
     */
    public String realNameFlag = "";

    public ReqEntrustRec(HashMap<String, String> p_hashMap, ReqRespHeader p_header) throws Exception {
        reqHeader = p_header;
        if (p_hashMap.containsKey("AppId")) {
            appId = p_hashMap.get("AppId");
            if (appId == null) {
                appId = "";
            }
        }
        if (p_hashMap.containsKey("MchId")) {
            merchantId = p_hashMap.get("MchId");
            if (merchantId == null) {
                merchantId = "";
            }
        }
        if (p_hashMap.containsKey("OurBankAccount")) {
            ownAct = p_hashMap.get("OurBankAccount");
            if (ownAct == null) {
                ownAct = "";
            }
        }
        if (p_hashMap.containsKey("Description")) {
            description = p_hashMap.get("Description");
        }
        if (p_hashMap.containsKey("RdSeq")) {
            rdSeq = p_hashMap.get("RdSeq");
        }
        if (p_hashMap.containsKey("Cur")) {
            cur = p_hashMap.get("Cur");
        }
        if (p_hashMap.containsKey("Amount")) {
            amount = p_hashMap.get("Amount");
        }
        if (p_hashMap.containsKey("Memo")) {
            memo = p_hashMap.get("Memo");
        }
        if (p_hashMap.containsKey("Attach")) {
            attach = p_hashMap.get("Attach");
        }
        if (p_hashMap.containsKey("OppActName")) {
            oppActName = p_hashMap.get("OppActName");
        }
        if (p_hashMap.containsKey("CertType")) {
            certType = p_hashMap.get("CertType");
        }
        if (p_hashMap.containsKey("CertNumber")) {
            certNumber = p_hashMap.get("CertNumber");
        }
        if (p_hashMap.containsKey("CellPhone")) {
            cellPhone = p_hashMap.get("CellPhone");
        }
        if (p_hashMap.containsKey("PlanID")) {
            planId = p_hashMap.get("PlanID");
        }
        if (p_hashMap.containsKey("ContractID")) {
            channelAuthCode = p_hashMap.get("ContractID");
        }
        if (p_hashMap.containsKey("ClientIp")) {
            createIP = p_hashMap.get("ClientIp");
        }
        if (p_hashMap.containsKey("RealNameFlag")) {
            realNameFlag = p_hashMap.get("RealNameFlag");
        }
    }
}
